	<?php echo $this->Html->css(array(HOST.'/dictionary',HOST.'/form',HOST.'/actions'),null,array('inline'=>false));?>
<?php echo $this->Html->script(array(HOST.'/actions'),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));?>

<body>
<?php echo $this->Section->main(); ?>

	<div class="container container_3">		
		<div class='grid_1'>
			<?php echo $this->Html->link($this->Html->image(HOST.'/logo.png'),'/',array('escape'=>false))?>
			<?php echo $this->element('menu-left')?>
		</div>		
		<div class='grid_2'>
			<div class="container container_offers_3">
				<div class="offers_grid_3">
					<div class="content">			
				
				
				
				
				
				
				<div class="offersColumns index">
					<h2><?php __('Wyswietlanie/Ukrywanie pól oferty');?></h2>
					<table cellpadding="0" cellspacing="0">
					<tr>
							<th><?php echo $this->Paginator->sort(__('Nazwa pola',true),'id');?></th>
							<th><?php echo $this->Paginator->sort('mieszkania');?></th>
							<th><?php echo $this->Paginator->sort('domy');?></th>
							<th><?php echo $this->Paginator->sort('lokale');?></th>
							<th><?php echo $this->Paginator->sort('dzialki');?></th>
							<th><?php echo __('Edycja',true);?></th>
					</tr>
					<?php
					$i = 0;
					foreach ($offersColumns as $offersColumn):
						$class =  ' class="actions"';
						$mieszkania = ($offersColumn['OffersColumn']['mieszkania']) ? 'On' : 'Off';						
						$domy = ($offersColumn['OffersColumn']['domy']) ? 'On' : 'Off';
						$lokale = ($offersColumn['OffersColumn']['lokale']) ? 'On' : 'Off';
						$dzialki = ($offersColumn['OffersColumn']['dzialki']) ? 'On' : 'Off';
						$check_mieszkania = ($offersColumn['OffersColumn']['mieszkania']) ? 'check' : 'uncheck';
						$check_domy = ($offersColumn['OffersColumn']['domy']) ? 'check' : 'uncheck';
						$check_lokale = ($offersColumn['OffersColumn']['lokale']) ? 'check' : 'uncheck';
						$check_dzialki = ($offersColumn['OffersColumn']['dzialki']) ? 'check' : 'uncheck';
						if ($i++ % 2 == 0) {
							$class = ' class="altrow actions"';
						}
					?>
					<tr<?php echo $class;?>>
						<td align="center"><strong><?php echo $offersColumn['OffersColumn']['id']; ?></strong>
							<br/><?php echo (empty($offersColumn['OffersColumn']['opis_columny'])) ? '- brak opisu -' : $offersColumn['OffersColumn']['opis_columny']; ?>&nbsp;</td>
						<td valign="middle"><?php echo $this->Html->link($mieszkania, array('action' => 'edit', $offersColumn['OffersColumn']['id'],'mieszkania'),array('class'=>$check_mieszkania)); ?>&nbsp;</td>
						<td valign="middle"><?php echo $this->Html->link($domy, array('action' => 'edit', $offersColumn['OffersColumn']['id'],'domy'),array('class'=>$check_domy)); ?>&nbsp;</td>
						<td valign="middle"><?php echo $this->Html->link($lokale, array('action' => 'edit', $offersColumn['OffersColumn']['id'],'lokale'),array('class'=>$check_lokale)); ?>&nbsp;</td>
						<td valign="middle"><?php echo $this->Html->link($dzialki, array('action' => 'edit', $offersColumn['OffersColumn']['id'],'dzialki'),array('class'=>$check_dzialki)); ?>&nbsp;</td>
						<td valign="middle"><?php echo $this->Html->link(__('Edytuj',true), array('action' => 'edit', $offersColumn['OffersColumn']['id']),array('class'=>'edit')); ?>&nbsp;</td>
					</tr>
				<?php endforeach; ?>
					</table>
				</div>

				


			<?php if($session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'admin' || $session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'manag'){?>		
			
			<?php echo $this->Html->script(array(HOST.'/actions'),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));?>
			<div class="actions main_actions">
				<h3><?php __('Actions'); ?></h3>
				<ul>
					<li><?php echo $this->Html->link(__('Lista ofert', true), array('controller' => 'offers', 'action' => 'index')); ?> </li>
				</ul>
			</div>
			<?php }?>
							
				
					</div>
				</div>
			</div>
		</div>
		<div class='clear'>&nbsp;</div>
		<?php echo $this->element('footer')?>
	</div>
	<div class='clear'>&nbsp;</div>
</body>